package nz.ac.vuw.ecs.kcassell.personcars;

import java.util.logging.Logger;

/**
 * This class has characteristics of both a Person and a Car. ToString,
 * hashCode, equals, and a constructor accesses both Person and Car fields. Most
 * methods access fields directly.
 * 
 * @author Keith
 */

public class PersonCarLogger {
	// Person fields
	private String firstName;
	private String lastName;
	private int id;

	// Car fields
	private String make;
	private String model;

	/** The vehicle id number */
	private int vin;

	private final Logger logger = Logger.getLogger(this.getClass()
			.getSimpleName());

	public String getFirstName() {
		logger.entering("PersonCarSpecial", "getFirstName");
		return firstName;
	}

	public void setFirstName(String firstName) {
		logger.entering("PersonCarSpecial", "setFirstName");
		this.firstName = firstName;
	}

	public String getLastName() {
		logger.entering("PersonCarSpecial", "getLastName");
		return lastName;
	}

	public void setLastName(String surname) {
		logger.entering("PersonCarSpecial", "setLastName");
		this.lastName = surname;
	}

	public int getId() {
		logger.entering("PersonCarSpecial", "getId");
		return id;
	}

	public void setId(int id) {
		logger.entering("PersonCarSpecial", "setId");
		this.id = id;
	}

	public String getMake() {
		logger.entering("PersonCarSpecial", "getMake");
		return make;
	}

	public void setMake(String make) {
		logger.entering("PersonCarSpecial", "setMake");
		this.make = make;
	}

	public String getModel() {
		logger.entering("PersonCarSpecial", "getModel");
		return model;
	}

	public void setModel(String model) {
		logger.entering("PersonCarSpecial", "setModel");
		this.model = model;
	}

	public int getVin() {
		logger.entering("PersonCarSpecial", "getVin");
		return vin;
	}

	public void setVin(int vin) {
		logger.entering("PersonCarSpecial", "setVin");
		this.vin = vin;
	}

	public String getPersonInfo() {
		return "" + id + ": " + firstName + " " + lastName;
	}

	public String getPersonName() {
		return firstName + " " + lastName;
	}

	public String getCarInfo() {
		return "" + vin + ": " + make + " " + model;
	}

	public String getCarDescription() {
		return make + " " + model;
	}

}
